package com.ep.thirdPlatformProject.system.exception;

import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

@Getter
@Setter
public class BaseException extends RuntimeException implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private int code;
    private String message;


    public BaseException(BaseExceptionEnum baseExceptionEnum) {

        this.message = baseExceptionEnum.getMessage();

        this.code = baseExceptionEnum.getCode();

    }

    public BaseException(int code, String message) {
        this.code = code;
        this.message = message;
    }

}
